import { createRouter, createWebHistory } from 'vue-router'
import NotFound from '@/views/error/NotFound.vue'
import PkindexView from '@/views/pk/PkindexView.vue'
import RanklistView from '@/views/ranklist/RanklistView.vue'
import RecordindexView from '@/views/record/RecordindexView.vue'
import userBotsView from '@/views/user/bots/userBotsView.vue'

const routes = [
  {
    path: "/",
    name: "home",
    redirect: "/pk/"
  },
  {
    path: "/pk/",
    name: "pk_index",
    component: PkindexView,
  },
  {
    path: "/randlist/",
    name: "randlist_index",
    component: RanklistView,
  },
  {
    path: "/record/",
    name: "record_index",
    component: RecordindexView,
  },
  {
    path: "/userBot/",
    name: "user_index",
    component: userBotsView,
  },
  {
    path: "/404/",
    name: "notfound",
    component: NotFound,
  },
  {
    path: "/:catchAll(.*)",
    redirect: "/404/"
  },

]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
